package com.recharge.common.util;

/**
 * @author $
 * @version V1.0
 * @className $
 * @description: $
 * @createTime $ $
 */
public class Constant {

    public static final String AUTH_TOKEN = "authToken";
    
    public static final String LOGIN_SALT = "storyweb-bp";

    public static final String USER = "user:";

    //数据权限 redis 前缀
    public static final String ROLE_DATA_PERMISSION = "role_data_permission:";
 
    //Shiro redis 前缀
    public static final String PREFIX_SHIRO_CACHE = "storyweb-bp:cache:";
 
    //redis-key-前缀-shiro:refresh_token
    public final static String PREFIX_SHIRO_REFRESH_TOKEN = "storyweb-bp:refresh_token:";
 
    //JWT-currentTimeMillis
    public final static String CURRENT_TIME_MILLIS = "currentTimeMillis";

    public final static int HTTP_SUCCESS = 200;

    public final static int UNAUTHORIZED = 401;

    public final static String USER_INFO = "user_info";

    public final static String MERCHANT_INFO = "merchant_info";

    public final static String MERCHANT_ACCOUNT = "merchant:account";

    public final static String ORDER_TOTAL = "account:total";

    public final static String GOODS_INFO = "goods:info";

    public final static String ORDER_INFO = "order:info";
    
    public final static String GOODS_PROVIDER_LIST = "goods:provider";

	public static final String PROVIDER_API = "provider:api";

	public static final String PROVIDER_ORDER = "provider:order";

	public static final String TRANSACTION_ORDER = "transaction:order";

    public static final String PROVIDER_THRESHOLD = "provider:threshold";

    public static final String PROVIDER_CARD = "provider:card";

    public static final String PROVIDER_CURRENT_SEND_COUNT = "provider:send_count";

    public static final String PROVIDER_LAST_TIME = "provider:last_time";

    public static final String TRANSACTION_TEMP = "provider:transaction";


    public final static String LOCK = "REDLOCK";

    public final static String ORDER_QUEUE = "order_queue";


    /**
     *  	是否有效  IS_DELETE 删除   IS_DELETE_FALSE 有效
     */
    public final static int IS_DELETE = -1;
    public final static int IS_DELETE_FALSE = 1;

    /**
     * 商品上下架状态：1，上架；0，下架
     */
    public final static int BUSINESS_GOODS_STATUS_0 = 0;
    public final static int BUSINESS_GOODS_STATUS_1 = 1;

    /**
     * 商品类型：1.话费 2.油卡 3.流量 4.游戏点卡 5.固话 6.宽带 7.视频会员卡 8.生活缴费
     */
    public final static int BUSINESS_GOODS_PHONE_FEE = 1;
    public final static int BUSINESS_GOODS_OIL_CARD = 2;
    public final static int BUSINESS_GOODS_PHONE_DATA_FEE = 3;
    public final static int BUSINESS_GOODS_GAME_POINT_CARD = 4;
    public final static int BUSINESS_GOODS_TELEPHONE_FEE = 5;
    public final static int BUSINESS_GOODS_NETWORK_FEE = 6;
    public final static int BUSINESS_GOODS_VOIDE_MEMBER_CARD = 7;
    public final static int BUSINESS_GOODS_LIFE_FEE = 8;


    /**
     * 供货单状态：-1,失败；0，新建/待处理；1，已提交；2，已成功；3，充值中 4,未确认
     */
    public final static int PROVIDER_ORDER_STATUS_fail = -1;
    public final static int PROVIDER_ORDER_STATUS_0 = 0;
    public final static int PROVIDER_ORDER_STATUS_1 = 1;
    public final static int PROVIDER_ORDER_STATUS_2 = 2;
    public final static int PROVIDER_ORDER_STATUS_3 = 3;
    public final static int PROVIDER_ORDER_STATUS_4 = 4;

    /**
     * 供货单：是否供应结束 1：是，0：否
     */
    public final static int PROVIDER_ORDER_IS_OVER_0 = 0;
    public final static int PROVIDER_ORDER_IS_OVER_1 = 1;

    /**
     * 订单状态：1.创建 2.处理中 3.成功 4.失败 5.充值中 6.异常 7.未确认
     */
    public final static int RECHARGE_ORDER_STATUS_1 = 1;
    public final static int RECHARGE_ORDER_STATUS_2 = 2;
    public final static int RECHARGE_ORDER_STATUS_3 = 3;
    public final static int RECHARGE_ORDER_STATUS_4 = 4;
    public final static int RECHARGE_ORDER_STATUS_5 = 5;
    public final static int RECHARGE_ORDER_STATUS_6 = 6;
    public final static int RECHARGE_ORDER_STATUS_7 = 7;
    /**
     * 	订单详情：商家回调状态：1，已发送；2，发送成功；3，发送失败
     */
    public final static int ORDER_DETAIL_MERCHANT_CALLBACK_STATUS_1 = 1;
    public final static int ORDER_DETAIL_MERCHANT_CALLBACK_STATUS_2 = 2;
    public final static int ORDER_DETAIL_MERCHANT_CALLBACK_STATUS_3 = 3;
    /**
     * 	订单详情：供应商回掉状态：1，已发送；2，发送成功；3，发送失败
     */
    public final static int ORDER_DETAIL_PROVIDER_CALLBACK_STATUS_1 = 1;
    public final static int ORDER_DETAIL_PROVIDER_CALLBACK_STATUS_2 = 2;
    public final static int ORDER_DETAIL_PROVIDER_CALLBACK_STATUS_3 = 3;

    /**
     * 	商品组生效类型  1，立即生效,2：定时生效
     */
    public final static int GOODS_GROUP_ENABLE_TYPE_1 = 1;
    public final static int GOODS_GROUP_ENABLE_TYPE_2 = 2;

    /**
     * 	商品组状态  1.新建 2.已使用
     */
    public final static int GOODS_GROUP_STATUS_1 = 1;
    public final static int GOODS_GROUP_STATUS_2 = 2;

    /**
     * 	代理商品组状态  1.正常 2.维护
     */
    public final static int MERCHANT_GOODS_GROUP_STATUS_1 = 1;
    public final static int MERCHANT_GOODS_GROUP_STATUS_2 = 2;
    
    public static final String TREE_ROOT_ID = "0";
    
    /**
     * 	查询菜单树的类型
     */
	public static final String TREE_TYPE_MENU = "menu";
	public static final String TREE_TYPE_TREE = "tree";
	
	/**
	 * 菜单
	 */
	public static final String  MENU = "0";
	/**
	 * 按钮
	 */
	public static final String  BUTT = "1";
    /**
	 *  存在时间
	 */
	private static final long EXPIRE_TIME = 24 * 60 * 60 * 1000;

    /**
     * 异步返回订单状态
     */
    public static final int CALL_BACK_SUCCESS = 1;
    public static final int CALL_BACK_FAIL = -1;
    public static final int CALL_BACK_PROCESS = 0;
    public static final int CALL_BACK_NUKNOW = 2;
    public static final int CALL_BACK_NOT_EXIST = 3;
    public static final int CALL_BACK_CARD_INVALID = 4;

    /**
     * 支付状态
     */
    public static final int PAYMENT_STATUS_1 = 1;
    public static final int PAYMENT_STATUS_2 = 2;
    public static final int PAYMENT_STATUS_3 = 3;
    public static final int PAYMENT_STATUS_4 = 3;

    /**
     * 是否手动调单 0.自动 1.手动
     */
    public static final int MANUAL_PROVIDER_ORDER_STATUS_0 = 0;
    public static final int MANUAL_PROVIDER_ORDER_STATUS_1 = 1;

    /**
     * 是否是补充0.不是 1.是
     */
    public static final int REMEDY_PROVIDER_ORDER_STATUS_0 = 0;
    public static final int REMEDY_PROVIDER_ORDER_STATUS_1 = 1;

    /**
     * 0.失败 1.成功 2.处理中
     */
    public static final int TRANSACTION_STATUS_0 = 0;
    public static final int TRANSACTION_STATUS_1 = 1;
    public static final int TRANSACTION_STATUS_2 = 2;

    /**
     * 0.未发送 1.成功 -1.失败
     */
    public static final int MERCHANT_CALL_STATUS_0 = 0;
    public static final int MERCHANT_CALL_STATUS_1 = 1;
    public static final int MERCHANT_CALL_STATUS_2 = 2;
    public static final int MERCHANT_CALL_STATUS_fail = -1;

    /**
     *代理商 状态 0.停用 1.正常
     */
    public static final int MERCHANT_STATUS_0 = 0;
    public static final int MERCHANT_STATUS_1 = 1;

    /**
     * 数据同步的问题
     */
    public static final int IS_DATA_NO_SYNC = 0;
    public static final int IS_DATA_SYNC = 1;

    /**
     * 交易单类型 1.存款 2.提现 3.商品订单 4.退款 5.固定授信 6.临时款还款
     */
    public static int TRANSACTION_TYPE_1 = 1;
    public static int TRANSACTION_TYPE_2 = 2;
    public static int TRANSACTION_TYPE_3 = 3;
    public static int TRANSACTION_TYPE_4 = 4;
    public static int TRANSACTION_TYPE_5 = 5;
    public static int TRANSACTION_TYPE_6 = 6;
    /**
     * 重置类型 all:重置所有，next:重置到下一个，current:当前
     */
    public static final String RESET_TYPE_ALL = "all";
    public static final String RESET_TYPE_NEXT = "next";
    public static final String RESET_TYPE_CURRENT = "current";
    /**
     * 上游同步返回状态码 200.成功 500.失败 504.待确认 501.异常 505.卡密无效
     */
    public static int BUSINESS_RECHARGE_RETURN_STATUS_SUCCESS = 200;
    public static int BUSINESS_RECHARGE_RETURN_STATUS_FAIL = 500;
    public static int BUSINESS_RECHARGE_RETURN_STATUS_OUT_TIME = 504;
    public static int BUSINESS_RECHARGE_RETURN_STATUS_CARD_INVALID = 505;

    /**
     * 路由黑白名单 1.黑名单 2.白名单
     */
    public static int ROUTER_FILTER_TYPE_1 = 1;
    public static int ROUTER_FILTER_TYPE_2 = 2;

    /**
     * 加款添加类型
     */
    public static int DEPOSIT_TYPE_ADVANCE = 1; // 预付款
    public static int DEPOSIT_TYPE_CREDIT = 2; // 信用款
    public static int DEPOSIT_TYPE_BAIL = 3; // 保证金
    public static int DEPOSIT_TYPE_LONG_CREDIT = 4; // 固定授信

    /**
     * 1.自动退款 2.人工退款
     */
    public static int REFUND_TYPE_AUTO = 0;
    public static int REFUND_TYPE_MANUAL = 1;

    /**
     * 1.已退款 0.未退款
     */
    public static int REFUND_STATUS_0 = 0;
    public static int REFUND_STATUS_1 = 1;

    /**
     * 0.自动 1.人工
     */
    public static int PROVIDER_AUTO = 0;
    public static int PROVIDER_MANUAL = 1;

    /**
     * 1.收入 2.支出
     */
    public static int INCOME = 1;
    public static int EXPEND = 2;

    /**
     * 用户状态
     * 0.锁定 1.有效
     */
    public static int USER_LOCK = 0;
    public static int USER_UNLOCK = 1;

    /**
     * 存款审核状态
     */
    public static int DEPOSIT_VERIFICATION_UNKNOWN = 0; // 待审核
    public static int DEPOSIT_VERIFICATION_SUCCESS = 1; // 通过
    public static int DEPOSIT_VERIFICATION_FAIL = 2; // 驳回
//    public static int DEPOSIT_VERIFICATION_OVER = 3;// 完成

    /**
     * 提现审核状态
     */
    public static int WITHDRAW_VERIFICATION_UNKNOWN = 0; // 待审核
    public static int WITHDRAW_VERIFICATION_SUCCESS = 1; // 通过
    public static int WITHDRAW_VERIFICATION_FAIL = 2; // 驳回

    /**
     * 1卡密转直充
     *
     * 2直充
     *
     * 3人工充值
     *
     * 4卡密代充
     *
     * 5上游收卡
     *
     * 6本地卡密提卡
     *
     * 7上游卡密提卡
     *
     * 8虚拟卡单
     *
     * 9收卡本地消耗
     *
     * 10直充匹配收卡代充
     *
     * 11api调用(鉴权)
     *
     * 12众筹人工
     *
     * 13自制卡密提卡
     */
    public static int PROVIDER_METHOD_1 = 1;
    public static int PROVIDER_METHOD_2 = 2;

    /**
     * 0 停用
     * 1 正常
     * 2 试用
     * */
    public static int PROVIDER_STATUS_0 = 0;
    public static int PROVIDER_STATUS_1 = 1;
    public static int PROVIDER_STATUS_2 = 2;

     /**
     * UNIT_SCALE : %
     */
    public static int UNIT_SCALE = 1;

    /**
     * 亏损类型 0.不允许可平价 1.允许 2.不允许只能盈利
     */
    public static int LOSS_TYPE_0 = 0; // 不允许可平价
    public static int LOSS_TYPE_1 = 1; // 允许
    public static int LOSS_TYPE_2 = 2; // 不允许只能盈利

    /**
     * 保证金加减
     */
    public static int REPAYMENT_ADD = 1; // 加款
    public static int REPAYMENT_REMOVE = 2; // 还款

    /**
     * 是否是补充 0为否 1为是
     */
    public static final int IS_REMEDY = 1;
    public static final int IS_REMEDY_FALSE = 0;


    /**
     * 重试通道 0.不重试 1.重试所有 2.重试当前 3.重试下一个
     */
    public static final int ORDER_RETRY_STATUS_0 = 0;
    public static final int ORDER_RETRY_STATUS_1 = 1;
    public static final int ORDER_RETRY_STATUS_2 = 2;
    public static final int ORDER_RETRY_STATUS_3 = 3;

    /**
     * 卡密供应记录状态
     */
    public static int PROVIDER_CARD_FAIL = -1; // 失败
    public static int PROVIDER_CARD_UNKNOW = 0; // 处理中
    public static int PROVIDER_CARD_SUCCESS = 1; // 成功

    /**
     * 卡密供应方式类型
     */
    public static int PROVIDER_CARD_METHOD_API = 0; //接口导入
    public static int PROVIDER_CARD_METHOD_FILE = 1; //本地导入
    /**
     * 卡密状态
     */
    public static int CARDVOUCH_STATUS_INVALID = -1; // 无效
    public static int CARDVOUCH_STATUS_VERIFICATION = 0; // 已核销
    public static int CARDVOUCH_STATUS_VALID = 1; // 有效
    public static int CARDVOUCH_STATUS_PROCESS = 2; // 充值中
    public static int CARDVOUCH_STATUS_UNKNOW = 3; // 未确认

    /**
     * 供货商类型 1 话费供应商 2 卡密供应商 3 油卡供应商
     */
    public static int PROVIDER_TYPE_1 = 1; //话费供应商
    public static int PROVIDER_TYPE_2 = 2; //卡密供应商
    public static int PROVIDER_TYPE_3 = 3; //油卡供应商

    public static int MAX_QUEUE_NUMBER = 100000;
}
